package com.LastingRunner;
import android.content.Context;
import android.database.sqlite.*;

public class RunningDataOpenHelper extends SQLiteOpenHelper {
	private static final int DATABASE_VERSION = 1;
	private static final String TABLE_NAME = "running_data";
	private static final String DATABASE_NAME = "running_data";
	private static final String TABLE_CREATE =
	            "CREATE TABLE " + TABLE_NAME + " (" +
	            "DATE INTEGER, " +
	            "LAP INTEGER," +
	            "TIME_USED INTEGER," +
	            "STEP_FREQ INTEGER);";

	RunningDataOpenHelper(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(TABLE_CREATE);
		db.execSQL("insert into running_data values(978307200000, 1, 130, 0)");
		db.execSQL("insert into running_data values(978307200000, 2, 130, 0)");
		db.execSQL("insert into running_data values(1009843200000, 1, 130, 0)");
		db.execSQL("insert into running_data values(1009843200000, 2, 130, 0)");
		db.execSQL("insert into running_data values(1009843200000, 3, 130, 0)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		
	}

}
